package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSystemConfig;
import com.appkubes.mall.core.po.MallSystemConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSystemConfigMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSystemConfigSqlProvider.class, method="countByExample")
    long countByExample(MallSystemConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSystemConfigSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSystemConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_system_config",
        "where config_key = #{configKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String configKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_system_config (config_key, app_key, ",
        "global_config_key, config_value, ",
        "create_time, update_time)",
        "values (#{configKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{globalConfigKey,jdbcType=VARCHAR}, #{configValue,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER})"
    })
    int insert(MallSystemConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSystemConfigSqlProvider.class, method="insertSelective")
    int insertSelective(MallSystemConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSystemConfigSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="config_key", property="configKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="global_config_key", property="globalConfigKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_value", property="configValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER)
    })
    List<MallSystemConfig> selectByExampleWithRowbounds(MallSystemConfigExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSystemConfigSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="config_key", property="configKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="global_config_key", property="globalConfigKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_value", property="configValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER)
    })
    List<MallSystemConfig> selectByExample(MallSystemConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "config_key, app_key, global_config_key, config_value, create_time, update_time",
        "from mall_system_config",
        "where config_key = #{configKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="config_key", property="configKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="global_config_key", property="globalConfigKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_value", property="configValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER)
    })
    MallSystemConfig selectByPrimaryKey(String configKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSystemConfigSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSystemConfig record, @Param("example") MallSystemConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSystemConfigSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSystemConfig record, @Param("example") MallSystemConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSystemConfigSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSystemConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config
     *
     * @mbg.generated
     */
    @Update({
        "update mall_system_config",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "global_config_key = #{globalConfigKey,jdbcType=VARCHAR},",
          "config_value = #{configValue,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER}",
        "where config_key = #{configKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSystemConfig record);
}